//
//  WSInputYzmViewController.m
//  FamilyLinkPro
//
//  Created by 江鹏 on 2023/9/6.
//  Copyright © 2023 SiterWell.Co.,Ltd. All rights reserved.
//

#import "WSInputYzmViewController.h"

@interface WSInputYzmViewController ()

@end

@implementation WSInputYzmViewController

+ (WSInputYzmViewController *)showController:(UIViewController *) viewController {
    WSInputYzmViewController *vc = [[WSInputYzmViewController alloc] init];
    [viewController.navigationController pushViewController:vc animated:YES];
    return vc;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self setupSubviews];
}

-(void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
    [self.yzmView.codeTextFiled1 becomeFirstResponder];
}

- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    [self.yzmView resignFirstResponder];
}

// MARK: 添加子控件
- (void)setupSubviews {
    [self.view addSubview:self.yzmView];
    [self.yzmView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.view).insets(UIEdgeInsetsZero);
    }];
    self.yzmView.delegate = self;
    
}

#pragma mark - lazy

- (WSInputYzmView *)yzmView {
    if (!_yzmView) {
        _yzmView = [[WSInputYzmView alloc] initWithFrame:CGRectZero];
        
    }
    return _yzmView;
}



// MARK: Delegate

#pragma mark -- WSInputYzmViewDelegate

- (void)requestYzmClick {
    NSLog(@"获取验证码");
}


// TODO: 请求验证码接口.
- (void)validateVerifyCode:(NSString *)verficode {
    [WSResetPasswordViewController showController:self];
}


@end
